#ifndef _SE_EDITORLAYER_
#define _SE_EDITORLAYER_

#include "Render/Camera.h"
#include "Scene/NativeScript.h"
#include "Panels/SceneHierarchyPanel.h"

namespace SE
{
	class CameraController final : public NativeScript
	{
	public:
		enum class MoveMode
		{
			FixedAxis, FollowForward
		};

	private:
		MoveMode	mMoveMode = MoveMode::FollowForward;
		Float		mCameraMoveSpeed = 5.0f;
		Float		mPanMoveSpeed = 2.0f;
		Vector2f	mLastMousePosition = Vector2f(0.0f);
		Boolean		mIsMouseFirstInScreen = true;
		Boolean		mIsMouseFocused = false;

	public:
		virtual void onUpdate(Entity entity, const Double deltaMilliseconds) override;
	};

	enum class EngineMode
	{
		Editor, Play
	};

	class EditorLayer final : public Layer
	{
	private:
		EngineMode mode;

		Ref<Scene> mScene;
		Ref<SceneHierarchyPanel> mSceneHierarchyPanel;

		Ref<Camera> mEditorCamera;

	public:
		EditorLayer();
		~EditorLayer();

		virtual void onCompute(const Double deltaMilliseconds) override;
		virtual void onRender(const Double deltaMilliseconds) override;
		virtual String getName() const override;
	};
} // !namespace SE

#endif // !_SE_EDITORLAYER_